package com.kim.seata.caller.server.service.feign.impl;

import com.kim.seata.caller.server.service.feign.UserInfoFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Project: kim-distributed-transaction
 * @PackageName: com.kim.caller.server.service.feign.impl
 * @FileName: UserInfoFeignServiceImpl.java
 * @Description: The UserInfoFeignServiceImpl is...
 * @Author: kimwu
 * @Time: 2020-12-29 09:59:57
 */
@Slf4j
@Component
public class UserInfoFeignServiceImpl implements UserInfoFeignService {
    @Override
    public String addNoSeata() {
        log.info("addNoSeata()  -->  抛出了异常");
        return "ok";
    }

    @Override
    public String addSeata() {
        log.info("addSeata()  -->  抛出了异常 开始执行seata分布式事务回滚");
        throw new RuntimeException("addSeata()  -->  抛出了异常 开始执行seata分布式事务回滚");
    }
}
